package org.whm.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.whm.service.TestService;
import org.zkdg.utils.entity.PageParam;
import org.zkdg.utils.entity.PageVo;

@Controller
public class HelloController {

	@Autowired
	private TestService service;
	

	@RequestMapping("/hello")
	String hello(Model model) {
		model.addAttribute("nnn", "hellowww");
		return "/index";
	}

	@RequestMapping("/getData")
	@ResponseBody
	PageVo<Map<String, Object>> getData(PageParam param) {
		PageVo<Map<String, Object>> pp = service.getData(param);
		return pp;
	}
}
